package com.ap.core.business.message.response.translators;

import com.ap.core.business.message.domain.translators.BindingMetaData;
import com.ap.core.business.message.response.translators.listener.ResponseListener;
import com.ap.core.exception.BusinessFailureException;

/**
 * User: Ranjit.Singh
 * Service for translating response info to response jaxb object.
 * @param <REQ> - Type of request object
 * @param <RES> - Type of response object
 */
public interface ResponseTranslator<REQ, RES> {

    /**
     * It will populate the response object of type <RES>
     * @param request  - request object of Type <REQ>
     * @param response - response object of Type <RES>
     * @param bindingMetaData - binding meta data
     * @param responseMetaData - response meta data
     * @param responseListener - response listener to give call back to message processor
     */
    void populateResponse(REQ request, RES response, BindingMetaData bindingMetaData, ResponseMetaData responseMetaData, ResponseListener responseListener) throws BusinessFailureException;
}
